package com.aichongbang.acb.service.impl;

import com.aichongbang.acb.po.Stuff;
import com.aichongbang.acb.mapper.StuffMapper;
import com.aichongbang.acb.service.IStuffService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author acb
 * @since 2021-06-01
 */
@Service("stuffService")
public class StuffServiceImpl extends ServiceImpl<StuffMapper, Stuff> implements IStuffService {

    @Resource
    private StuffMapper stuffMapper;

    @Override
    public Integer addStuff(Stuff stuff) {
        return stuffMapper.addStuff(stuff);
    }

    @Override
    public boolean deleted(Integer tId) {
        int n = stuffMapper.deleteById(tId);
        return n > 0 ? true : false;
    }
}
